﻿<%@ Page Language="C#" MasterPageFile="~/MangerPage.master" AutoEventWireup="true" CodeFile="Manger_NewsAdd.aspx.cs" Inherits="Manger_NewsAdd" Title="新闻添加/编辑" %>
<%@ Register Assembly="FredCK.FCKeditorV2" Namespace="FredCK.FCKeditorV2" TagPrefix="FCKeditorV2" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<div class="pagetitle">
    新闻添加/编辑</div>
    <asp:XmlDataSource ID="XmlDataSource1" runat="server" DataFile="~/xml/NewsType_000000.xml">
    </asp:XmlDataSource>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:Jxzy_Database %>" OnInserted="SqlDataSource1_Inserted" OnUpdated="SqlDataSource1_Updated">
    </asp:SqlDataSource>
    <asp:HiddenField ID="hfType" runat="server" Value="0" />
    <div style="float:left"><asp:TreeView ID="TreeView1" runat="server" DataSourceID="XmlDataSource1" ShowLines="True" OnSelectedNodeChanged="TreeView1_SelectedNodeChanged" Visible="False">
        <DataBindings>
            <asp:TreeNodeBinding DataMember="siteMapNode" TextField="typename" ValueField="typeid" />
        </DataBindings>
        <ParentNodeStyle Font-Bold="False" />
        <HoverNodeStyle Font-Underline="True" ForeColor="#6666AA" />
        <SelectedNodeStyle BackColor="#C0C0FF" Font-Bold="True" Font-Underline="False" HorizontalPadding="0px"
            VerticalPadding="0px" />
        <NodeStyle Font-Names="Tahoma" Font-Size="8pt" ForeColor="Black" HorizontalPadding="5px"
            NodeSpacing="0px" VerticalPadding="1px" />
    </asp:TreeView></div>
    <div style="float:left;">
        <div>
            &nbsp;<asp:Button ID="btSelect" runat="server" OnClick="btSelect_Click" Text="选择文章类型" />&nbsp;
            发表到：&nbsp;
            <asp:TextBox ID="tbNewsType" runat="server" BorderColor="White" BorderStyle="None"
                Font-Bold="True" ReadOnly="True" Width="320px"></asp:TextBox>
            <asp:Label ID="lbTypePath" runat="server" Visible="False"></asp:Label>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ControlToValidate="tbNewsType"
                ErrorMessage="请选择文章类型" ValidationGroup="1"></asp:RequiredFieldValidator></div>
        <div>标题：<asp:TextBox ID="tbTitle" runat="server" Width="465px"></asp:TextBox>&nbsp;
            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="tbTitle"
                ErrorMessage="标题不能为空" ValidationGroup="1"></asp:RequiredFieldValidator></div>
        <div>作者：<asp:TextBox ID="tbWriter" runat="server"></asp:TextBox>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="tbWriter"
                ErrorMessage="作者不能为空" ValidationGroup="1"></asp:RequiredFieldValidator>
            <asp:CheckBox ID="cbContinue" runat="server" Text="连续添加文章" ToolTip="添加多篇文章时勾选。" />&nbsp;
        </div>
        <div>来源：<asp:TextBox ID="tbFrom" runat="server"></asp:TextBox>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ErrorMessage="来源不能为空"
                ValidationGroup="1" ControlToValidate="tbFrom"></asp:RequiredFieldValidator>
  <FCKeditorV2:FCKeditor ID="FCKeditor1" runat="server" Height="500px" Width="720px" >
    </FCKeditorV2:FCKeditor>   
        </div>
        <div style="text-align: center">
            &nbsp;<asp:Button ID="btNewsAdd" runat="server" Text="发布文章" OnClick="btNewsAdd_Click" ValidationGroup="1" /></div>
    </div>
</asp:Content>

